
//
//  UIButton+Extension.swift
//  仿一个新浪微博
//
//  Created by 孙家林 on 15/9/22.
//  Copyright © 2015年 sunjialin. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(title: String, imageName: String, fontSize: CGFloat = 12, color: UIColor = UIColor.darkGrayColor()){
    
        self.init()
        
        setTitle(title, forState: UIControlState.Normal)
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        setTitleColor(color, forState: UIControlState.Normal)
    
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }


}
